home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / news / readers / nn-tk.001 / nn-tk~ / nn / config.h < prev    next >
C/C++ Source or Header  |  1996-04-03  |  14KB  |  458 lines

  1. /**************************** NN CONFIGURATION ***************************
  2.  *
  3.  *    Configuration file for nn.
  4.  *
  5.  *    You must edit this file to reflect your local configuration
  6.  *    and environment.
  7.  *
  8.  *    Before editing this file, read the licence terms in the README
  9.  *    file and the installation guidelines in the INSTALLATION file.
  10.  *
  11.  *    (c) Copyright 1990, Kim F. Storm.  All rights reserved.
  12.  */
  13.  
  14. #define    RELEASE     "6.5"
  15.  
  16. #include <stdio.h>
  17. #include <ctype.h>
  18.  
  19. /************************* USER INTERFACE *********************************
  20.  *
  21.  *    TK
  22.  *    Compile to use X windows interface using the TK toolkit
  23.  *    Requires tcl and tk be installed
  24.  *
  25. */
  26. #define TK
  27.  
  28. /*      TCL and TK include files */
  29. /*#define TKINCLUDE -I/usr/include*/
  30. #define TKINCLUDE -I/usr/local/include/tcl
  31.  
  32. /*      TCL and TK libraries */
  33. /*#define TKLIB */
  34. /*#define TKFLAG -ltk4.1 -ltcl7.5 -lX11 -lm*/
  35. #define TKLIB -L/usr/local/lib
  36. #define TKFLAG -ltk4.0 -ltcl7.4 -lX11 -lm
  37.  
  38. /*
  39. *    DO_NOV_DIGEST allows auto-splitting of digests
  40. */
  41. #define DO_NOV_DIGEST
  42.  
  43. /********************************** NNTP *********************************
  44.  *
  45.  *     Define NNTP to enable nntp support.  If you are not using NNTP,
  46.  *    just leave the following NNTP_* definitions as they are - they
  47.  *    will be ignored anyway.
  48.  *
  49.  *    Consult the file NNTP for further information on the use of NNTP.
  50.  */
  51.  
  52. /*#define NNTP*/
  53.  
  54. /*
  55.  *    Define NNTP_SERVER to the name of a file containing the name of the
  56.  *    nntp server.
  57.  *
  58.  *    It is vital that both the nnmaster and all nn users on a machine
  59.  *    uses the same nntp server, because the nn database is synchronized
  60.  *    with a specific news active file.
  61.  *
  62.  *    If the file name does not start with a slash, it is relative to
  63.  *    LIB_DIRECTORY defined below.
  64.  *    NOTE: If you plan to use the included inews, it MUST be a full pathname
  65.  */
  66.  
  67. #define NNTP_SERVER    "/usr/lib/nntp_server"
  68.  
  69. /*
  70.  *
  71.  *      Defining NO_NNTP_SERVER_READ causes NNTP to ignore the NNTP_SERVER
  72.  *      file for reading news but still allows the -R command to specify
  73.  *      an NNTP sever. The purpose of this is to allow for occasional
  74.  *      reading of news via NNTP in stiuations where news reading is 
  75.  *      usually done from local files but posting is via NNTP.
  76.  */
  77.  
  78. /* #define NO_NNTP_SERVER_READ */
  79.  
  80. /*
  81.  *    Define NNTP_POST if you want nn to reject attempts to post via
  82.  *    NNTP to a server, that disallows postings.
  83.  *
  84.  *    You should define this, if you use the NNTP based mini-inews for
  85.  *    postings from NNTP clients.  If you use another mechanism, that
  86.  *    does not involve NNTP, you should leave it undefined.
  87.  */
  88.  
  89. #define NNTP_POST
  90.  
  91. /*
  92.  *    NNTP's mini-inews seems to require that messages contain a complete
  93.  *    header with Message-ID, Path, and Date fields which the normal inews
  94.  *    generates itself.  If your mini-inews requires these headers to
  95.  *    be present, define NNTP_MINI_INEWS_HEADER below.
  96.  */
  97.  
  98. #undef NNTP_MINI_INEWS_HEADER    /* uses "broken" mini-inews */
  99.  
  100. /*
  101.  *    Define NNTP_PATH_HOSTNAME to force a specific hostname into the
  102.  *    Path: header generated when NNTP_MINI_INEWS_HEADER is defined.
  103.  *    This is useful for multi-machine sites with one mail/news gateway.
  104.  *
  105.  *    If the string starts with a '/' it is taken as the name of a file
  106.  *    from which the outgoing hostname should be read (at runtime).
  107.  */
  108.  
  109. /* #define NNTP_PATH_HOSTNAME    "puthostnamehere"    */
  110.  
  111.  
  112. /***************** OPERATING SYSTEM DEPENDENT DEFINITIONS *******************
  113.  *
  114.  *      Include the appropriate s- file for your system below.
  115.  *
  116.  *    If a file does not exist for your system, you can use
  117.  *    conf/s-template.h as a starting point for writing you own.
  118.  */
  119.  
  120. #include "s-sunos5.h"
  121.  
  122. /*
  123.  *    Define DEFAULT_PAGER as the initial value of the 'pager' variable.
  124.  *    nnadmin pipes shell command output though this command.
  125.  */
  126.  
  127. /* #define DEFAULT_PAGER    "pg -n -s" */        /* system V */
  128. #define DEFAULT_PAGER        "more"            /* bsd */
  129.  
  130. /*
  131.  *    DEFAULT_PRINTER is the initial value of the 'printer' variable.
  132.  *    nn's :print command pipes text into this command.
  133.  */
  134.  
  135. #define DEFAULT_PRINTER        "lp -s"            /* System V */
  136. /* #define DEFAULT_PRINTER    "lpr -p -JNEWS"    */     /* bsd */
  137.  
  138. /*
  139.  *     Define RESIZING to make nn understand dynamic window-resizing.
  140.  *     (It uses the TIOCGWINSZ ioctl found on most 4.3BSD systems)
  141.  *    This should be defined in the conf/s-xxxxx.h file.
  142.  *
  143.  *    PLEASE DEFINE THIS IN YOUR conf/s-<os>.h FILE INSTEAD!!
  144.  */
  145.  
  146. /* #define RESIZING        */
  147.  
  148. /*
  149.  *    Include file configuration.  Most systems with an ANSI conformant C
  150.  *    compiler should have these.  If you have them, you should use them!
  151.  *
  152.  *    Again, PLEASE DEFINE THESE IN YOUR conf/s-<os>.h FILE!
  153.  *
  154.  *    IF YOU HAVE THESE FILES, IT IS *VERY IMPORTANT* THAT YOU INCLUDE THEM
  155.  */
  156.  
  157. /* Do you have /usr/include/string.h */
  158. /* #define HAVE_STRING_H */
  159.  
  160. /* Do you have /usr/include/unistd.h */
  161. /* #define HAVE_UNISTD_H */
  162.  
  163. /* Do you have /usr/include/stdlib.h */
  164. /* #define HAVE_STDLIB_H */
  165.  
  166. /* Do you have /usr/include/memory.h */
  167. /* #define HAVE_MEMORY_H */
  168.  
  169. /* Do you have /usr/include/fcntl.h */
  170. /* #define HAVE_FCNTL_H */
  171.  
  172. /********************** MACHINE DEPENDENT DEFINITIONS **********************
  173.  *
  174.  *    Include the appropriate m- file for your system below.
  175.  *
  176.  *    If a file does not exist for your system, you can use
  177.  *    conf/m-template.h as a starting point for writing you own.
  178.  */
  179.  
  180. #include "m-sparc.h"
  181.  
  182.  
  183. /**************************** LOCALIZATION ****************************
  184.  *
  185.  *    Specify where programs and files are installed.
  186.  *
  187.  *    BIN_DIRECTORY    - the location of the user programs (mandatory)
  188.  *
  189.  *    LIB_DIRECTORY     - the location of auxiliary programs and files.
  190.  *               (mandatory UNLESS ALL of the following are defined).
  191.  *
  192.  *    MASTER_DIRECTORY - the location of the master program (on server)
  193.  *               (= LIB_DIRECTORY if undefined)
  194.  *
  195.  *    CLIENT_DIRECTORY - the location of auxiliary programs (on clients)
  196.  *               (= LIB_DIRECTORY if undefined)
  197.  *
  198.  *    HELP_DIRECTORY   - the location of help files, online manual, etc.
  199.  *               (= CLIENT_DIRECTORY/help if undefined)
  200.  *
  201.  *    CACHE_DIRECTORY     - if NNTP is used, nn uses this central directory
  202.  *               to store working copies of articles on the local
  203.  *               system.  If not defined, it stores the articles
  204.  *               in each user's ~/.nn directory.
  205.  *
  206.  *    TMP_DIRECTORY    - temporary file storage.  Overriden by $TMPDIR.
  207.  *               (= /usr/tmp if undefined).
  208.  *
  209.  *    LOG_FILE         - the location of nn's log file.
  210.  *               (= LIB_DIRECTORY/Log if undefined).
  211.  */
  212.  
  213. #define BIN_DIRECTORY    "/usr/local/bin"
  214. #define LIB_DIRECTORY    "/usr/local/lib/nn"
  215.  
  216. /*************************** NEWS TRANSPORT **************************
  217.  *
  218.  *    Specify the location of your news programs and files
  219.  *    You only need to specify these if you are not
  220.  *    satisfied with the default settings.
  221.  *
  222.  *    NEWS_DIRECTORY         - The news spool directory.
  223.  *                  Default: /usr/spool/news
  224.  *
  225.  *    NEWS_LIB_DIRECTORY    - The news lib directory.
  226.  *                  Default: /usr/lib/news
  227.  *
  228.  *    NOV_DIRECTORY        - The .overview directory.
  229.  *                  Default: /usr/spool/news
  230.  *
  231.  *    INEWS_PATH        - The location of the inews program.
  232.  *                  Default: NEWS_LIB_DIR/inews
  233.  *
  234.  *    RMGROUP_PATH        - The location of the rmgroup program.
  235.  *                  Default: NEWS_LIB_DIR/{rm,del}group
  236.  */
  237.  
  238. #define NEWS_DIRECTORY        "/usr/spool/news"
  239. #define NEWS_LIB_DIRECTORY    "/usr/lib/news"
  240. #define NOV_DIRECTORY        "/usr/spool/news"
  241.  
  242. /* #define INEWS_PATH        "/usr/lib/news/inews"    */
  243.  
  244.  
  245. /*
  246.  *    If no "Lines:" header field is present, NN can be made to
  247.  *    count them itself.
  248.  */
  249.  
  250. /* #define DONT_COUNT_LINES    1 */
  251.  
  252. /*************************** MAIL INTERFACE *************************
  253.  *
  254.  *    Specify a mailer that accepts a letter WITH a header IN THE TEXT.
  255.  *
  256.  *     A program named 'recmail' program is normally delivered with
  257.  *    the Bnews system, or you can use sendmail -t if you have it.
  258.  *
  259.  *    The contrib/ directory contains two programs which you might
  260.  *    be able to use with a little tweaking.
  261.  */
  262.  
  263. /* #define REC_MAIL    "/usr/lib/news/recmail"    */    /* non-sendmail */
  264. #define REC_MAIL    "/usr/lib/sendmail -t"        /* sendmail */
  265.  
  266.  
  267. /*
  268.  *    Define HAVE_ROUTING if your mailer understands domain based
  269.  *    adresses (...@...) and performs the necessary rerouting (e.g.
  270.  *    Sendmail or Smail).
  271.  *
  272.  *    Otherwise, nn will provide a simple routing facility using
  273.  *      routing information specified in the file LIB_DIRECTORY/routes.
  274.  */
  275.  
  276. #define HAVE_ROUTING            /* */
  277.  
  278. /*
  279.  *    If HAVE_ROUTING is NOT defined, nn needs to know the name of
  280.  *     your host.  To obtain the host name it will use either of the
  281.  *    'uname' or 'gethostname' system calls as specified in the s-
  282.  *    file included above.
  283.  *
  284.  *    If neither 'uname' nor 'gethostname' is available, you must
  285.  *    define HOSTNAME to be the name of your host.  Otherwise, leave
  286.  *    it undefined (it will not be used anyway).
  287.  */
  288.  
  289. /* #define HOSTNAME    "myhost" */    /* Not used if HAVE_ROUTING */
  290.  
  291. /*
  292.  *    Define APPEND_SIGNATURE if you want nn to ask users to append
  293.  *    ~/.signature to mail messages (reply/forward/mail).
  294.  *
  295.  *    If the mailer defined in REC_MAIL automatically includes .signature
  296.  *    you should not define this (it will fool people to include it twice).
  297.  *
  298.  *    I think 'recmail' includes .signature, but 'sendmail -t' doesn't.
  299.  */
  300.  
  301. #define APPEND_SIGNATURE        /* */
  302.  
  303. /*
  304.  *    BUG_REPORT_ADDRESS is the initial value of the bug-report-address
  305.  *    variable which is used by the :bug command to report bugs in
  306.  *    the nn software.  
  307.  *    This address is currently set up as a mailing list, and it is
  308.  *    intended that it will point to the current maintainer.
  309.  */
  310.  
  311. #define BUG_REPORT_ADDRESS    "bugs@nn.org"
  312.  
  313.  
  314. /*************************** DOCUMENTATION ***************************
  315.  *
  316.  *     Specify directories for the user and system manuals
  317.  *
  318.  *     Adapt this to your local standards; the manuals will be named
  319.  *         $(MAN_DIR)/program.$(MAN_SECTION)
  320.  *
  321.  *    USER_MAN    - nn, nntidy, nngrep, etc.
  322.  *    SYS_MAN        - nnadmin
  323.  *    DAEMON_MAN    - nnmaster
  324.  */
  325.  
  326. #define USER_MAN_DIR     "/usr/local/man/man1"
  327. #define USER_MAN_SECTION     "1"
  328.  
  329. #define SYS_MAN_DIR     "/usr/local/man/man1"
  330. #define SYS_MAN_SECTION     "1m"
  331.  
  332. #define DAEMON_MAN_DIR     "/usr/local/man/man8"
  333. #define DAEMON_MAN_SECTION     "8"
  334.  
  335.  
  336. /************************** LOCAL POLICY *****************************
  337.  *
  338.  *    Define STATISTICS if you want to keep a record of how much
  339.  *    time the users spend on news reading.
  340.  *
  341.  *    Sessions shorter than the specified number of minutes are not
  342.  *    recorded (don't clutter up the log file).
  343.  *
  344.  *    Usage statistics is entered into the $LOG_FILE with code U
  345.  */
  346.  
  347. /* #define STATISTICS    5 */         /* minutes */
  348.  
  349. /*
  350.  *    Define ACCOUNTING if you want to keep accumulated accounting
  351.  *    based on the statistics in a separate 'acct' file.  In this
  352.  *    case, the accounting figures will be secret, and not be
  353.  *    written to the Log file.  And the users will not be able to
  354.  *    "decrease" their own account.
  355.  *
  356.  *    See account.c for optional cost calculation parameters.
  357.  */
  358.  
  359. /* #define ACCOUNTING */
  360.  
  361. /*
  362.  *    Define AUTHORIZE if you want to restrict the use of nn to
  363.  *    certain users or certain periods of the day.  Define both
  364.  *    this and ACCOUNTING if you want to impose a usage quota
  365.  *
  366.  *    See account.c for implementing various access policies.
  367.  */
  368.  
  369. /* #define AUTHORIZE */
  370.  
  371. /*
  372.  *    Default folder directory
  373.  */
  374.  
  375. #define FOLDER_DIRECTORY    "~/News"
  376.  
  377. /*
  378.  *    Max length of authors name (in "edited" format).
  379.  *    Also size of "Name" field on the article menus.
  380.  *    You may want to increase this if your terminals are wider than
  381.  *    80 columns.
  382.  */
  383.  
  384. #ifdef TK
  385. #define NAME_LENGTH         24
  386. #else
  387. #define NAME_LENGTH         16
  388. #endif
  389.  
  390. /*
  391.  *    Does your 'inews' program run immediately, or does it defer?
  392.  *    If you have C-News, it can take minutes to find out if a post
  393.  *    was accepted, whereas with INN, it only takes seconds.
  394.  */
  395.  
  396. #define INEWS_IS_FAST        /* comment out for C-News */
  397.  
  398. /*
  399.  *    Synchronous posting: If set this will cause NN to wait until a
  400.  *    post or mail is *actually* finished.  If you want to NN's
  401.  *    "Article posted" message to be *accurate*, then define this. 
  402.  *    Warning: Do NOT define this if you are using C-News, or you will
  403.  *    have to wait 60 seconds or more to find out if the post has been
  404.  *    accepted.  You probably want this if you are using INN or posting
  405.  *    via some sort of NNTP.
  406.  */
  407.  
  408. #define SYNCHRONOUS_POSTING    /* comment out for C-News */
  409.  
  410. /*
  411.  *    PUT_TIMESTAMP_IN_SCRIPTS
  412.  *    Defining this causes the "inst" script to add identifying information
  413.  *    to the beginning of the shell scripts.
  414.  */
  415. #define PUT_TIMESTAMP_IN_SCRIPTS
  416.  
  417. /*
  418.  *    CONFIG_NUM_IN_VERSION
  419.  *    Defining this will make NN announce itself including the build number
  420.  *    like "NN version 6.5.xx #12", rather than "NN version 6.5.xx".
  421.  */
  422. #define CONFIG_NUM_IN_VERSION
  423.  
  424. /*
  425.  *    NO_X_NEWSREADER
  426.  *    Define this to disable the "X-Newsreader: " header in posts and mail
  427.  *    Son-of-RFC1036 is rumoured to discourage this.
  428.  */
  429. /* #define NO_X_NEWSREADER */
  430.  
  431. /*
  432.  *    ART_GREP
  433.  *    Define this if you want to enable the "experimental" subject
  434.  *    body search code.  On the "G" menu, there will be two extra
  435.  *    choices: "b" body search unread, and "B" body search all.
  436.  *    Choose your pattern, and you will be presented with a merged group
  437.  *    containing the articles you chose.  There may still be bugs!
  438.  *    WARNING:
  439.  *    THIS WOULD BE *BAD* FOR NNTP SITES!  You don't want all your
  440.  *     users downloading the entire news database...
  441.  */
  442.  
  443. #define ART_GREP
  444.  
  445. /*
  446.  *    CACHE_PURPOSE
  447.  *    Defining this makes NN cache the newsgroup/purpose list, sorted
  448.  *    in memory and use binary search to locate a group's purpose.
  449.  *    This can be a winner on systems with *everything* in their
  450.  *    newsgroups list.
  451.  */
  452.  
  453. #define    CACHE_PURPOSE
  454.  
  455. /************************ CONFIGURATION COMPLETED ************************/
  456.  
  457. #include "global.h"
  458.